//package com.music.service.security.impl;
//
//import com.music.dto.basic.UserDTO;
//import com.music.mapper.basic.UserMapper;
//import com.music.service.basic.UserService;
//import lombok.SneakyThrows;
//import org.springframework.security.core.userdetails.UserDetails;
//import org.springframework.security.core.userdetails.UserDetailsService;
//import org.springframework.security.core.userdetails.UsernameNotFoundException;
//
//import javax.annotation.Resource;
//import java.util.Objects;
//
//public class UserDetailsServiceImpl implements UserDetailsService {
//
//    @Resource
//    private UserService userService;
//
//    @SneakyThrows
//    @Override
//    public UserDetails loadUserByUsername(String userName) throws UsernameNotFoundException {
//        // 查询用户信息
//        UserDTO userDto = userService.loginCheck(userName);
//        if (Objects.isNull(userDto)) {
//            throw new RuntimeException("用户名或密码错误！");
//        }
//        return null;
//    }
//}
